#include "swarmSocketServer.h"
using namespace std;
swarmSocketServer::swarmSocketServer(int pt, bool sync = true)
{
}

bool swarmSocketServer::check()
{
	return true;
}
vector<vector<string> > swarmSocketServer::read(int sec, int usec)
{
    static int wait = 0;
	vector<vector<string> > messages;
    string name = "";
    string stuff;
    while (wait-- > 0) {
        cout << "Mocket SNORE!  Mocket SNORE! " << wait << " MORE!\n";
        return messages;
    }
    while (true) {
        vector<string> msg;
        cout << "Who are you?  ";
        cin >> name;
        if (name == "!") {
            cout << "Thank you for enduring the mock socket server.  Should they call me mocket server?  HAH! That IS funny\n";
            break;
        }
        cout << "What do you want?  ";
        cin >> stuff;
        if (name == "w") {
            cout << "Good night...\n";
            wait = atoi(stuff.c_str());
            break;
        }
        else {
            cout << "HAH!  That's funny\n";
            msg.push_back(stuff);
            msg.push_back(name);
            messages.push_back(msg);
        }
    }
	return messages;
}
swarmSocketServer::~swarmSocketServer()
{
}








